package ${namespace}.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import ${namespace}.dao.${bclazz}Dao;
import ${namespace}.entity.${bclazz}Entity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * ${comment}DAO实现
 * @author ${author}
 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
 */
@Repository
public class ${bclazz}DaoImpl extends BaseDaoImpl<${bclazz}Entity> implements ${bclazz}Dao {

	/**
	 * 保存${comment}信息
	 * @param ${sclazz}Entity
	 * @return
	 * @author ${author}
	 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
	 */
	@Override
	public long save${bclazz}(${bclazz}Entity ${sclazz}Entity) {
		return super.insert(${sclazz}Entity);
	}

	/**
	 * 分页查询${comment}信息
	 * @param pageParam 分页对象
	 * @param ${sclazz} 分页参数
	 * @return PageBean 分页参数及数据
	 * @author ${author}
	 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
	 */
	public PageBean list${bclazz}Page(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新${comment}
	 * @param ${sclazz}Entity
	 * @return
	 * @author ${author}
	 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
	 */
	@Override
	public int update${bclazz}(${clazz} ${sclazz}Entity) {
		return super.update(${sclazz}Entity);
	}

	/**
	 * 删除${comment}
	 * @param ${sclazz}Id
	 * @return
	 * @author ${author}
	 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
	 */
	public int delete${bclazz}ById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询${comment}
	 * @param param
	 * @return
	 * @author ${author}
	 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
	 */
	@Override
	public List<${bclazz}Entity> list${bclazz}( Map<String, Object> param) {
		return super.listBy(param);
	}
}
